﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WuDada.Core.Post.Domain;

namespace WuDada.Core.Post.Persistence
{
    public interface IAnswerDao
    {
        /// <summary>
        /// 新增Answer
        /// </summary>
        /// <param name="answerVO">被新增的Answer</param>
        /// <returns>新增後的Answer</returns>
        AnswerVO CreateAnswer(AnswerVO answerVO);

        /// <summary>
        /// 取得Answer By AnswerId
        /// </summary>
        /// <param name="answerId">AnswerId</param>
        /// <returns>Answer</returns>
        AnswerVO GetAnswerById(int answerId);

        /// <summary>
        /// 刪除Answer
        /// </summary>
        /// <param name="answerVO">被刪除的Answer</param>
        void DeleteAnswer(AnswerVO answerVO);

        /// <summary>
        /// 更新Answer
        /// </summary>
        /// <param name="answerVO">被更新的Answer</param>
        /// <returns>更新後的Answer</returns>
        AnswerVO UpdateAnswer(AnswerVO answerVO);

        /// <summary>
        /// 取得Answer清單
        /// </summary>
        /// <param name="conditions">搜尋條件</param>
        /// <returns>Answer清單</returns>
        IList<AnswerVO> GetAnswerList(IDictionary<string, string> conditions);

        /// <summary>
        /// 取得Answer數量
        /// </summary>
        /// <param name="conditions"></param>
        /// <returns></returns>
        int GetAnswerCount(IDictionary<string, string> conditions);
    }
}
